package com.chenyitun.cloudcommon.base;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author chenyitun@163.com
 * @since 19.03.14
 */
public class BaseEntity implements Serializable{
    private static final long serialVersionUID = 1L;
    /**
     * 状态标记（1：启用；0：禁用；2：审核；）
     */
    public static final String STATUS_ZERO = "0";
    public static final String STATUS_NORMAL = "1";
    public static final String STATUS_AUDIT = "2";
    //编号
    protected Long id;
    //创建时间,下单日期
    protected Date createTime;
    //创建者
    protected Long createBy;
    //更新时间
    protected Date updateTime;
    //更新者
    protected Long updateBy;

    //状态,1:正常,0禁用,(用户类:2冻结)
    protected String status;
    //开始查询
    protected Date begin;
    //结束查询
    protected Date end;

    protected String search;

    public BaseEntity() {

    }

    public BaseEntity(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSearch() {
        return search;
    }

    public void setSearch(String search) {
        this.search = search;
    }


    public Date getBegin() {
        return begin;
    }

    public void setBegin(Date begin) {
        this.begin = begin;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }
}
